Add per-file git metadata, diff view and comment-to-agent support in file editor#319
Closed
tbrandenburg wants to merge 2 commits intomainfrom
Closed
Add per-file git metadata, diff view and comment-to-agent support in file editor#319tbrandenburg wants to merge 2 commits intomainfrom
tbrandenburg wants to merge 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Regarding \\[file-path]\: [comment]and refresh git info after saves.Description
_is_tracked_file,_is_ignored_file,_parse_diff_blocks, and a newget_repository_file_git_details(repo_name, file_path)that returns tracked/ignored flags,lineStats, last commit metadata, last modified, line count and parsed diff blocks; handles untracked files by synthesizing an all-added block. (file:packages/pybackend/repository_service.py)GET /api/repositories/{name}/git/file?path=...that returns the per-file git details. (file:packages/pybackend/app.py)RepositoryFileGitDetailstype andapi.getRepositoryFileGitDetails(name, filePath)client method. (file:packages/frontend/src/hooks/useApi.ts)RepositoryPageto show a top “Git File Info” panel and a conditional “Diff View” (before/after) when a file is opened and git is available, added Comment buttons on Preview and Diff panels that open a modal and injectRegarding \\[relative-file-path]\: [user-comment]into the agent chat, and refreshed file/git metadata after saving. (file:packages/frontend/src/pages/RepositoryPage.tsx)packages/frontend/src/styles/index.css.get_repository_file_git_detailscovering tracked and untracked file behavior. (file:packages/pybackend/tests/unit/test_repository_service.py)Testing
python -m pytest packages/pybackend/tests/unit/test_repository_service.pyand related focused runs; backend tests passed (17 passedinitially; selected file-git-detail tests passed later).src/components/GitTab.test.tsxwithnpm run -w packages/frontend test -- src/components/GitTab.test.tsxand it passed (1 file, 2 tests passed).npm run -w packages/frontend buildand the build succeeded.--runInBand) failed due to the unknown option; this was a CLI invocation issue and not a code test failure.Codex Task